﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2004A.Shopping.IRespository
{

    /*
     * OOP面向对象：封装、继承、多态
     * 
     * **/

    public interface IBaseRespository<T> : ICRUDRespository<T> where T : class,new()
    {

        /*
         * 委托：
         *  delegate
         *  Action
         *  Func
         *  Predication
         *  
         *  表达式：Expression
         * **/

        #region Select

        //带查询条件
        IQueryable<T> Select(Expression<Func<T,bool>> where);

        //查询带排序
        IQueryable<T> Select<Tkey>(Expression<Func<T, bool>> where,Expression<Func<T,Tkey>> sort);

        //查询、排序、分页
        IQueryable<T> Select<Tkey>(Expression<Func<T, bool>> where, Expression<Func<T, Tkey>> sort,
            int pageIndex,int pageSize);

        #endregion


    }
}
